﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Presentation;

namespace Infrastructure
{
    public abstract class Log:ILog
    {
        List<string> record = new List<string>();

        public void Add(String message)
        {
            record.Add(message);
        }

        public ReadOnlyCollection<string> Record
        {
            get
            {
                return new ReadOnlyCollection<string>(record);
            }
        }

        public void Clean()
        {
            record.Clear();
        }

        public virtual void WriteLog(String fileName){}

        public List<string> PrintLog()
        {
            return record;
        }

        public void CopyLogRecords(List<string> list)
        {
            record = list;
        }
    }
}
